<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet" />
<script src="assets/js/select2/select2.js"></script>
<style>
    .bootbox-close-button {
        width: 19px;
        height: 19px;
        border: none;
        cursor: pointer;
        -webkit-appearance: none;
        float: right;
        top: 4px;
        left: -5px;
        position: relative;
        background: #E9F5FF url("assets/img/nav-img/icon_close.png") no-repeat 0 0;
    }

    .attendjoinReturnClassRecordList .modal-dialog {
        width: 60% !important;
    }

    .modal-content {
        width: 100%;
    }

    input, select, .form-control {
        height: 30px;
    }

    .myDialogDetail label {
        margin-bottom: 0px !important;
    }

    .detailDialogStyle {
        line-height: 30px;
        margin-bottom: 15px;
    }

    .myDialogDetail1 .modal-body {
        padding-bottom: 0px !important;
        border-bottom-right-radius: 5px !important;
        border-bottom-left-radius: 5px !important;
    }
</style>
<div class="row">
    <!-- 映射列表 -->
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="leftTree">
        <div class="row" style="margin-bottom: 15px;margin-top:15px;font-size: 14px">
                    <span style="padding-left: 16px">
                        请选择报班所要退班的课时包
                    </span>
        </div>
        <div class="widget flat radius-bordered" style="margin-top: 0;box-shadow:0px 0px 10px rgba(122,161,184,0.3);">
            <div class="widget-body no-padding">
                <div class="table-scrollable">
                    <!-- 数据表列信息列表 -->
                    <table class="table table-hover dataTable newtable">
                        <thead>
                        <tr>
                            <th title="课程体系">课程体系</th>
                            <th title="课程名称">课程名称</th>
                            <th title="周几上课">周几上课</th>
                            <th title="上课时间">上课时间</th>
                            <th title="下课时间">下课时间</th>
                            <th title="上课教室">上课教室</th>
                            <th title="授课老师">授课老师</th>
                            <th title="剩余节数">剩余节数</th>
                            <th title="单节耗课时">单节耗课时</th>
                            <th title="操作">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#if page_bean.list?size==0>
                            <tr>
                                <td align="center">无数据</td>
                            </tr>
                        </#if>
                        <#list page_bean.list as data>
                            <tr>
                                <td>  ${(data.systemPidName???string(data.systemPidName?html,"未设置"))!'未设置'}</td>
                                <td>  ${(data.courseName???string(data.courseName?html,"未设置"))!'未设置'}</td>
                                <td>  <@dictionary groupCode="weekDay" dictionaryCode="${data.weekDay}" ;weekDay>${weekDay.value }</@dictionary></td>
                                <td>  ${(data.startTime???string(data.startTime?html,"未设置"))!'未设置'}</td>
                                <td>  ${(data.endTime???string(data.endTime?html,"未设置"))!'未设置'}</td>
                                <td>  ${(data.roomName???string(data.roomName?html,"未设置"))!'未设置'}</td>
                                <td>  ${(data.realName???string(data.realName?html,"未设置"))!'未设置'}</td>
                                <td>  ${(data.surplusMayTurnClassHour???string(data.surplusMayTurnClassHour?html,"未设置"))!'未设置'}</td>
                                <td>  ${(data.expendClassHour???string(data.expendClassHour?html,"未设置"))!'未设置'}</td>
                                <td><a onclick="showDialogChangeClass(this)"  serializeNum="${serializeNum}"  targetDataId="${data.memberId}"  memberPackageId="${data.memberPackageId}" classId="${data.classId}">退班</a>
                            </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
                ${pagingBar}
            </div>
        </div>
    </div>
</div>

<script>
    $(".selectpicker").select2();

    function showDialogChangeClass(that) {
        var serializeNum = $(that).attr("serializeNum");
        var memberPackageId = $(that).attr("memberPackageId");
        var classId = $(that).attr("classId");
        var targetDataId = $(that).attr("targetDataId");
        ajaxRequest("tssMemberReturnClassRecordController/toEditView.do", {
            serializeNum: serializeNum,
            memberId:targetDataId,
            memberPackageId:memberPackageId,
            classId:classId,
            type:1
        }, function (html) {
            getTopWin().bootbox.dialog({
                message: html,
                title: "亲子退班",
                className: 'myDialog returnClassRecordEdit'
            });
            $(".modal-header").find(".bootbox-close-button").removeClass("close");
            $(".modal-header").find(".bootbox-close-button").html("");
        }, function () {
            ajaxError("加载页面失败!")
        }, "get", "html")

    }
</script>